//
//  LSHttpTool.h
//  LearningSystemMEE
//
//  Created by heyong on 16/3/30.
//  Copyright © 2016年 bjttsx. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//成功回调
typedef void (^successBlock)(NSString *status);

@interface LSHttpTool : NSObject


+ (void)Post:(NSString *)URLString parameters:(id)parameters success:(void (^)(id responseObject))success failure:(void (^)(NSError *error))failure;

+(void)PostExit:(NSString *)URLString parameters:(id )parameters success:(void (^)(id))success failure:(void (^)(NSError *))failure;

//接口测试
+(void)PostCheckIP:(NSString *)URLString parameters:(id )parameters success:(void (^)(id))success failure:(void (^)(NSError *))failure;

/**
 *  下载
 */
+ (void)downLoad:(NSString *)URLString parameters:(id)parameters success:(void (^)(id))success failure:(void (^)(NSError *))failure;

/*
 *  上传
 **/
+ (void)upload:(NSString *)URLString parameters:(NSMutableDictionary *)parameters andFileName:(NSString *)fileName progress:(void (^)(id))progress success:(void (^)(id))success failure:(void (^)(NSError *))failure;


/*
 *  附件上传 + 图片名 更改头像
 **/
+ (void)upload:(NSString *)URLString parameters:(NSMutableDictionary *)parameters andFileName:(NSString *)fileName andImage:(UIImage *)image progress:(void (^)(id))progress success:(void (^)(id))success failure:(void (^)(NSError *))failure;

/**
 *  网络检测返回
 */
+(void)checkNetWork:(successBlock)success;

/**
 *  带视图
 */
+(void)checkNetWorkForView:(UIView *)view;

+ (BOOL)reachability;


@end
